package com.zhisheng.orders.feign;

/*
    全哥
*/

import com.zhisheng.products.entity.Products;
import com.zhisheng.result.MyResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@FeignClient("products")
public interface ProductsFeign {

    @GetMapping("products/{pid}")
    public MyResponseResult<Products> getProductById(@PathVariable("pid") Integer pid);

    @PutMapping("products/kouJian")
    public MyResponseResult<String> kouJian(@RequestBody Map<Integer,Integer> goods);

}
